package com.cattsoft.updownload.service;

import java.util.List;

import com.cattsoft.updownload.model.DocInfo;
import com.cattsoft.util.common.exception.OssApplicationException;
import com.cattsoft.util.common.service.IGenericService;
public class UpDownLoadServiceImpl implements IUpDownLoadService{
	private IGenericService service;

	public IGenericService getService() {
		return service;
	}

	public void setService(IGenericService service) {
		this.service = service;
	}

	public void saveDocInfo(DocInfo docInfo) throws OssApplicationException {
		 service.SaveData(docInfo);		
	}

	public List getDocInfoList() throws OssApplicationException {
		return service.getByHql("from DocInfo");
	}

	public DocInfo getDocInfoById(Long docId) throws OssApplicationException {		 
		return  (DocInfo)service.getByID(DocInfo.class, docId);
	}

 
	 
}
